Skip to content

🤖 feat: enable native Google tools for Gemini 3#3493

Merged
ThomasK33 merged 2 commits into
mainfrom
gemini-tools-tqzv
Jun 8, 2026
Merged

🤖 feat: enable native Google tools for Gemini 3#3493
ThomasK33 merged 2 commits into
mainfrom
gemini-tools-tqzv

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Enable provider-native Google Search and URL Context for direct Google Gemini 3 models, so Gemini 3 agents can use Google's built-in web/context tools alongside Mux function tools.

Background

Google's current Gemini 3 tooling supports combining provider-native tools with function calling. The previous Mux implementation had a stale comment that prevented Google native tools from being instantiated, so Gemini models only received Mux's runtime web_fetch and no native Google Search.

Implementation

  • Add a shared supportsGoogleNativeToolsWithFunctionTools() gate for Google native tools.
  • Gate native Google tools to Gemini 3 model IDs, including the valid models/gemini-3.5-flash spelling.
  • Instantiate google.tools.googleSearch({}) and google.tools.urlContext({}) for supported direct Google models.
  • Keep Gemini 2.5 and future Gemini 4 IDs off the native-tool path until the installed Google SDK serializes mixed native/function tools for them.
  • Add tokenizer fallback handling/tests for schema-less provider-native tools.

Validation

  • bun test src/common/utils/tools/toolDefinitions.test.ts src/common/utils/tools/tools.test.ts
  • bun x jest src/node/utils/main/tokenizer.test.ts --runInBand
  • make typecheck
  • make static-check
  • Ran deep-review-workflow and fixed the three verified findings: Gemini 4 over-gating, models/... Gemini 3 IDs, and unreachable url_context token fallback.

Risks

Medium-low. This changes tool availability for Google Gemini 3 direct-provider sessions only. The main risk is provider SDK compatibility, so the gate intentionally tracks the currently verified Gemini 3 mixed native/function path rather than pre-enabling future major versions.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $20.40

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 8, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 8, 2026
@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit db38a38 Jun 8, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the gemini-tools-tqzv branch June 8, 2026 16:21
@mux-bot mux-bot Bot mentioned this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant